/*--------------------------------------------------------------------------------------*\
**
** army_info_window.h
**
** Heroes IV
** Copyright 2000, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#ifndef ARMY_INFO_WINDOW_H_INCLUDED
#define ARMY_INFO_WINDOW_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "abstract_adv_object.h"
#include "bitmap_group_ptr.h"
#include "bitmap_layer_ptr.h"
#include "creature_info_window.h"
#include "game_window.h"
#include "hero.h"
#include "player.h"
#include "popup_window.h"
#include "skill.h"
#include "skill_icon_ptr.h"

class   t_adventure_frame;
class   t_button;
class   t_creature_array;
class   t_luck_icon_window;
class   t_morale_icon_window;
class   t_text_window;

class t_army_info_window : public t_window //popup_window
{
    enum
    {
	    k_max_skills_to_display = 5
    };
public :
    t_army_info_window ( t_creature_array * creature_ptr, t_skill_mastery skill_level, t_window* parent );
        
protected :

    void army_select( t_creature_info_window* window_ptr, int index );
    void close_click( t_button* button );
	void create_buttons();
    void create_icons();
    void create_text_windows();
	void open_army_click( t_button* button );
	void open_garrison_click( t_button* button );
	void open_town_click( t_button* button );
    void show_stats();
    void show_skills();


	t_text_window*              m_alignment_window;
	t_creature_array*			m_army;
	t_bitmap_group_ptr		    m_army_layout;
	t_window*					m_background;
	t_bitmap_group_ptr		    m_bitmaps_ptr;
	t_creature_info_window *    m_creature_window_ptr;
    t_text_window*              m_damage_text;
	t_text_window*              m_experience_text;
	t_window_ptr                m_experience_icon;
    t_text_window*				m_hitpoints_text;
	bool						m_is_boat;
	t_text_window*              m_level_window;
    t_luck_icon_window*         m_luck_icon;
	t_text_window*              m_luck_text;
	t_text_window*              m_melee_offense_text;
	t_text_window*              m_melee_defense_text;
    t_morale_icon_window*       m_morale_icon;
	t_text_window*				m_morale_text;
    t_text_window*              m_movement_text;
	t_player *		            m_player_ptr;
	t_text_window*              m_ranged_offense_text;
	t_text_window*              m_ranged_defense_text;
    t_skill_mastery             m_scouting_skill_level;
    int                         m_selected_slot;
	t_text_window*              m_shots_text;
    t_text_window*              m_spell_points_text;
	t_text_window*              m_speed_text;
    t_button *                  m_skill_button_ptr;
	t_skill_icon_ptr            m_skill_icons[k_max_skills_to_display];
	t_window *                  m_skill_window_ptr;
    t_button *                  m_stats_button_ptr;
	t_window *                  m_stats_window_ptr;
	t_text_window*              m_stealth_window;
};

// ---------------------------------------------------------------
// Run the army info window, including figuring out the needed skill 
// level
// ---------------------------------------------------------------
void run_army_info_window( t_creature_array * creature_ptr, t_adventure_frame* frame );

#endif // ARMY_INFO_WINDOW_H_INCLUDED
